require 'thread'
class Cron < ActiveRecord::Base
 
 threads = []

threads << Thread.new do
  while true do
    puts "activation agent"
    Computer.agent
    
    sleep(120)
    
   end 
end
threads << Thread.new do
  while true do
    puts "simulation infection"
    Virus.infection
    
    sleep(220)
    
   end 
   
end
# puts threads

threads.each {|t| t.join }

  
end
